using System;

namespace DiddlySquat
{
	using System.Diagnostics;

#if WINDOWS || XBOX
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		static void Main(string[] args)
		{
			//A way for displaying friendlier error messages to the user
			//Always use real errors when debugging
			if (Debugger.IsAttached)
			{
			    using (DiddlySquat game = new DiddlySquat())
			    {
			        game.Run();
			    }
			}
			else
			{
				try
				{
					using (DiddlySquat game = new DiddlySquat())
					{
						game.Run();
					}
				}
				catch (Exception e)
				{
					using (ErrorCatcher game = new ErrorCatcher(e))
					{
						game.Run();
					}
				}
			}
			
		}
	}
#endif
}

